// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameplayTagContainer.h"
#include "Engine/DataAsset.h"
#include "AbilityInfo.generated.h"

USTRUCT(BlueprintType)
struct FAuraAbilityInfo
{
	GENERATED_BODY()

	/** 技能标签 */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	FGameplayTag AbilityTag;

	/** 技能输入标签 */
	UPROPERTY(BlueprintReadOnly)
	FGameplayTag InputTag;

	/** 技能图标 */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	TObjectPtr<UTexture2D> Icon = nullptr;

	/** 背景材质 */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
	TObjectPtr<UMaterialInterface> BackgroundMaterial = nullptr;
	
};


/**
 * 能力信息数据资产
 */
UCLASS()
class AURA_API UAbilityInfo : public UDataAsset
{
	GENERATED_BODY()

public:

	/** 能力信息 */
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UAbilityInfo|AbilityInformation")
	TArray<FAuraAbilityInfo> AbilityInformation;

	/** 根据技能标签查找技能信息 */
	FAuraAbilityInfo FindAbilityInfoByTag(FGameplayTag AbilityTag, bool bLogNotFound = false) const;
};
